﻿<controls:ChildWindow x:Class="CCForm.SelectRB"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="455" Height="365" 
           Title="枚举值绑定" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="415*" />
            <ColumnDefinition Width="18*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Button x:Name="CancelButton" Content="取消" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1" Grid.ColumnSpan="2" />
        <Button x:Name="OKButton" Content="确定" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,67,0" Grid.Row="1" />
        <controls:TabControl Height="289" HorizontalAlignment="Left" Margin="14,9,0,0" Name="tabControl1" VerticalAlignment="Top" Width="407" Grid.ColumnSpan="2" Grid.RowSpan="2">
            <controls:TabItem Header="选择已有枚举值" Name="tabItem1">
                <Grid Width="432">
                    <ListBox Height="199" HorizontalAlignment="Left" Margin="0,6,0,0" Name="listBox1" VerticalAlignment="Top" Width="173" SelectionChanged="listBox1_SelectionChanged" />
                    <ListBox Height="163" HorizontalAlignment="Left" Margin="187,7,0,0" Name="listBox2" VerticalAlignment="Top" Width="187" />
                    <Button Content="New" Height="23" Margin="247,176,0,0" Name="Btn_New" VerticalAlignment="Top" Click="Btn_New_Click" HorizontalAlignment="Left" Width="40" />
                    <Button Content="Edit" Height="23" HorizontalAlignment="Left" Margin="192,176,0,0" Name="Btn_Edit" VerticalAlignment="Top" Width="36" Click="Btn_Edit_Click" />
                    <Button Content="Delete" Height="23" HorizontalAlignment="Right" Margin="0,176,85,0" Name="Btn_Del" VerticalAlignment="Top" Width="50" Click="Btn_Del_Click" />
                    <sdk:Label Height="28" 
                               HorizontalAlignment="Left" Margin="0,224,0,0" 
                               Name="Lab3"         VerticalAlignment="Top" Width="66" Content="字段英文名" />
                    <TextBox Height="23" HorizontalAlignment="Right" 
                             Margin="0,221,289,0" Name="TB_KeyOfEn" VerticalAlignment="Top" Width="87" />
                    <sdk:Label Height="28" 
                               HorizontalAlignment="Right" Margin="0,225,251,0" Name="label3" VerticalAlignment="Top" Width="36" Content="中文名" />
                    <TextBox Height="23" HorizontalAlignment="Left" Margin="195,224,0,0" 
                             Name="TB_KeyOfName" VerticalAlignment="Top" Width="120" />
                    <CheckBox Content="生成标签" 
                              Height="16" HorizontalAlignment="Right" 
                              Margin="0,226,47,0" Name="CB_IsGenerLab" VerticalAlignment="Top" IsChecked="True" />
                </Grid>
            </controls:TabItem>
            <controls:TabItem Header="新建枚举值" Name="tabItem2">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="283*" />
                    </Grid.ColumnDefinitions>
                    <sdk:Label Height="15" HorizontalAlignment="Left" Margin="6,53,0,0" Name="label1" VerticalAlignment="Top" Width="45" Content="枚举编号" Grid.Column="1" />
                    <sdk:Label Height="28" HorizontalAlignment="Left" Margin="6,6,0,0" Name="label2" VerticalAlignment="Top" Width="64" Content="标签名称" Grid.Column="1" />
                    <TextBox Height="23" HorizontalAlignment="Left" Margin="6,0,0,155" Name="TB_No" VerticalAlignment="Bottom" Width="120" Text="" Grid.Column="1" />
                    <TextBox Height="23" HorizontalAlignment="Left" Margin="6,24,0,0" Name="TB_Name" VerticalAlignment="Top" Width="120" Grid.Column="1" LostFocus="TB_Name_LostFocus" />
                     
                    <Button Content="Save" Height="23" HorizontalAlignment="Left" Margin="11,121,0,0" Name="Btn_Save" VerticalAlignment="Top" Width="49" Grid.ColumnSpan="2" Click="Btn_Save_Click" />
                    <Button Content="Delete" Height="23" HorizontalAlignment="Left" Margin="70,121,0,0" Name="Btn_DelIt" VerticalAlignment="Top" Width="48" Grid.Column="1" Click="Btn_Del_Click"   />
                    <ListBox Grid.Column="1" Height="239" HorizontalAlignment="Left" Margin="132,3,0,0" Name="listBox3" VerticalAlignment="Top" Width="232" />
                </Grid>
            </controls:TabItem>
        </controls:TabControl>
    </Grid>
</controls:ChildWindow>